package org.nobody.mallb2c.mallproduct.service.impl;

import org.springframework.stereotype.Service;

import java.util.Map;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.nobody.common.utils.PageUtils;
import org.nobody.common.utils.Query;

import org.nobody.mallb2c.mallproduct.dao.SpuInfoDescDao;
import org.nobody.mallb2c.mallproduct.entity.SpuInfoDescEntity;
import org.nobody.mallb2c.mallproduct.service.SpuInfoDescService;


@Service("spuInfoDescService")
public class SpuInfoDescServiceImpl extends ServiceImpl<SpuInfoDescDao, SpuInfoDescEntity> implements SpuInfoDescService {

  @Override
  public PageUtils queryPage(Map<String, Object> params) {
    IPage<SpuInfoDescEntity> page = this.page(
      new Query<SpuInfoDescEntity>().getPage(params),
      new QueryWrapper<SpuInfoDescEntity>()
    );

    return new PageUtils(page);
  }

  @Override
  public void saveSpuInfoDesc(SpuInfoDescEntity descEntity) {
    this.baseMapper.insert(descEntity);
  }

}
